// components/record_list/list.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    recordList : {
      type: Array,
      value: []
    },
    splj_index : {
      type: Number,
      value: 1
    },
    splj_total : {
      type: Number,
      value: 0
    },
    spjl_list_1:{
      type:Array,
      value:[]
    }
   
  },

  /**
   * 组件的初始数据
   */
  data: {

 
 
  }, 

  methods: {
    spjlPageUp(){
      let now_index = this.data.splj_index
      if (now_index != 1) {
        now_index = now_index - 1
        let spjl_l = this.data.recordList

        let show_list = []
        show_list.push(spjl_l[now_index-1])
        this.setData({
          splj_index: now_index,
          spjl_list_1: show_list,
        })   
      }
    },
    spjlPageDown(){
      let now_index = this.data.splj_index
      if (now_index < this.data.splj_total) {
        now_index = now_index + 1
        let spjl_l = this.data.recordList
        let show_list = []
        show_list.push(spjl_l[now_index-1])
        this.setData({
          spjl_list_1: show_list,
          splj_index: now_index
        })
   
      }
    },
    preViewImg(e) {
      console.log(e.target.dataset.url);
      let lists = []
      lists.push('https://logisticsengineering.gree.com/package_integrated_api/photo_manage/fs_download?file_id=' + e.target.dataset.url)
  
      wx.previewImage({
        current: e.target.dataset.url,
        urls: lists,
      })
    },
    

  }
})
